home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / 422mods.zip / DEVIL001.422 < prev    next >
Text File  |  1993-04-16  |  9KB  |  269 lines

  1. DEVL001.422  The Devil: Default Menu Ansified
  2. 3The Devil #1 @5419 7[1The Evil One7]
  3. Tue Apr 13 16:13:58 1993
  4. ┌─────────────────────────────────────────────────────────────────────────────┐
  5. │Filename   : DEVL001.422             Date: 4/13/93                           │
  6. │Mod Author : The Devil #1 WWIVnet @5432/IceNET @5419/ZebraNET@1/Vnet @1504004│
  7. │Difficulty : ██▒░░░░░░    Fidonet 1:396/90                                   │
  8. │Mod Version: 1                                                               │
  9. │BBS Version: 4.22                                                            │
  10. │Description: Default Menu Ansified  <Really Neat>                            │
  11. └─────────────────────────────────────────────────────────────────────────────┘
  12.         This mod prints out an ansi, then locates the user settings
  13. within the boxes on the ansi.  It is a mere BLOCK COPY.  Since this is not
  14. my first time writing a mod, I do have some experience.  I had written some
  15. 4.21 mods back when I used the alias of MEGADEATH and my mods were called
  16. MEGAD1.MOD MEGAD2.MOD etc...  So if you have seen or used any of the MEGAD
  17. mods, and have a questions, I can answer them.  Now on to the modding.
  18.  
  19.  
  20.  Key
  21. ═══════════
  22. +  Add
  23. -  Delete
  24. %  Modify
  25. =  Existing
  26.  
  27.  
  28. ──────────────────────────────────────────────────────────────────────────
  29. Step 1.  Backup the source.  ARJ A SRCBAK *.C *.H *.MAK BBS.EXE CONFIG.DAT
  30. ──────────────────────────────────────────────────────────────────────────
  31.  
  32. ──────────────────────────────────────────────────────────────────────────
  33. Step 2.  Now Load up DEFAULTS.C and block copy the following into the end.
  34. ──────────────────────────────────────────────────────────────────────────
  35.  
  36.  
  37. /* Block Copy DEVL001.MOD Begin */
  38.  
  39. void defaults(void)
  40. {
  41.   int i,i1,i2,done;
  42.   char s[81],s1[81],s2[81],ch;
  43.  
  44.   done=0;
  45.   print_cur_stat();
  46.   do {
  47.     tleft(1);
  48.     if (hangup)
  49.       return;
  50.     nl();
  51.     helpl=4;
  52.     if (okansi()) {
  53.       goxy(1,23);
  54.       prt(3,get_string(477));
  55.       ch=onek("Q?123456789ABCD");
  56.     } else {
  57.       goxy(1,23);
  58.       prt(3,get_string(478));
  59.       ch=onek("Q?1234567ABCD");
  60.     }
  61.     switch(ch) {
  62.       case 'Q':
  63.         done=1;
  64.         outchr(12);
  65.         break;
  66.       case '?':
  67.         outchr(12);
  68.         print_cur_stat();
  69.         break;
  70.       case '1':
  71.         outchr(12);
  72.         input_screensize();
  73.         break;
  74.       case '2':
  75.         outchr(12);
  76.         input_ansistat();
  77.         break;
  78.       case '3':
  79.         if (thisuser.sysstatus & sysstatus_pause_on_page)
  80.           thisuser.sysstatus ^= sysstatus_pause_on_page;
  81.         outchr(12);
  82.         nl();
  83.         prt(5,get_string(479));
  84.         if (yn())
  85.           thisuser.sysstatus |= sysstatus_pause_on_page;
  86.         break;
  87.       case '8':
  88.         outchr(12);
  89.         modify_mailbox();
  90.         break;
  91.       case 'B':
  92.         outchr(12);
  93.         config_qscan();
  94.         break;
  95.       case 'C':
  96.         outchr(12);
  97.         input_pw1();
  98.         break;
  99.       case 'D':
  100.         outchr(12);
  101.         do_macros();      /* Added for Morg15.Mod */
  102.         pausescr();       /* Added for Morg15.Mod */
  103.         break;
  104.       case 'A':
  105.         outchr(12);
  106.         change_colors();
  107.         break;
  108.       case '7':
  109.         outchr(12);
  110.         select_editor();
  111.         break;
  112.       case '6':
  113.         if (thisuser.sysstatus & sysstatus_funky_colors)
  114.           thisuser.sysstatus ^= sysstatus_funky_colors;
  115.         outchr(12);
  116.         nl();
  117.         prt(5,get_string(480));
  118.         if (yn())
  119.           thisuser.sysstatus |= sysstatus_funky_colors;
  120.         break;
  121.       case '5':
  122.         optional_lines();
  123.         break;
  124.       case '9':
  125.           nl();
  126.           goxy(21,21);
  127.           mpl(30);
  128.           inputl(thisuser.note,30);
  129.           /* inli(thisuser.note,ro,30,1); */
  130.           break;
  131.       case '4':
  132.         enter_regnum();
  133.         break;
  134.     }
  135.   } while ((!done) && (!hangup));
  136. }
  137.  
  138. void print_cur_stat(void)
  139. {
  140.   char s[81],s1[81],s2[81];
  141.   userrec ur;
  142.  
  143.   outchr(12);
  144.   printfile("DMENU");
  145.   goxy(23,5);
  146.   npr("2%d 7X 2%d\r\n",
  147.         thisuser.screenchars,
  148.         thisuser.screenlines);
  149.   goxy(23,7);
  150.   npr("2%s\r\n",
  151.      (thisuser.sysstatus & sysstatus_ansi)?
  152.        ((thisuser.sysstatus & sysstatus_color)? get_string(385):get_string(386)):
  153.      get_string(387));
  154.   goxy(23,9);
  155.   npr("2%s\r\n",
  156.      (thisuser.sysstatus & sysstatus_pause_on_page)?get_string(389):get_string(390));
  157.   goxy(21,19);
  158.   if ((thisuser.forwardsys==0) && (thisuser.forwardusr==0))
  159.     pl(get_string(392));
  160.   else {
  161.     if (thisuser.forwardsys) {
  162.       goxy(21,19);
  163.       outstr(get_string(393));
  164.       npr("2%s #%u @%u.\r\n",
  165.         net_networks[thisuser.net_num].name,
  166.         thisuser.forwardusr,thisuser.forwardsys);
  167.     } else {
  168.       if (thisuser.forwardusr==65535) {
  169.         goxy(21,19);
  170.         pl(get_string(300));
  171.       } else {
  172.         read_user(thisuser.forwardusr,&ur);
  173.         if (ur.inact & inact_deleted) {
  174.           thisuser.forwardusr=0;
  175.           goxy(21,19);
  176.           pl(get_string(392));
  177.         } else {
  178.           goxy(21,19);
  179.           outstr(get_string(393));
  180.           npr("2%s\r\n",nam(&ur,thisuser.forwardusr));
  181.         }
  182.       }
  183.     }
  184.   }
  185.   /* pl(get_string(394));
  186.   pl(get_string(395));
  187.   pl(get_string(396));
  188.   if (okansi()) {
  189.     pl(get_string(397)); */
  190.      goxy(21,17);
  191.      npr("2%s\r\n",
  192.       ((thisuser.defed) && (thisuser.defed<=numed))?
  193.         editors[thisuser.defed-1].description:get_string(5));
  194.      goxy(23,15);
  195.      npr("2%s\r\n",
  196.       (thisuser.sysstatus & sysstatus_funky_colors)?str_yes:str_no);
  197.   goxy(23,13);
  198.   npr("2%d\r\n",thisuser.optional_val);
  199.   goxy(21,21);
  200.   npr("2%s\r\n",thisuser.note);
  201.   goxy(23,11);
  202.     npr("2%ld\r\n",thisuser.wwiv_regnum);
  203. }
  204.  
  205. /* Alternate BLOCK - If you are not using ANSI.C or ENHANCE.C */
  206. /* Tolkein's VOID GOXY is included below.                     */
  207.  
  208. void goxy(int i, int j)
  209. /*
  210.  * This function will position the cursor at x:i, y:j coordinates on the
  211.  * screen. If the user has no ANSI then nothing happens.
  212.  *
  213.  */
  214. {
  215.   char s[12];
  216.  
  217.   if (okansi()) {
  218.     sprintf(s,"\x1b[%d;%dH",j,i);
  219.     outstr(s);
  220.   }
  221. }
  222.  
  223. /* End Block Copy For DEVL001.MOD */
  224.  
  225.  
  226. ──────────────────────────────────────────────────────────────────────────
  227. Step 3.  Now go comment out or delete your OLD 
  228. void defaults(void)  void print_cur_stats(void)
  229. ──────────────────────────────────────────────────────────────────────────
  230.  
  231.  
  232. ──────────────────────────────────────────────────────────────────────────
  233. Step 4.  Save DEFAULTS.C and RE-COMPILE.   Logon and go see how it looks! 
  234. ──────────────────────────────────────────────────────────────────────────
  235.  
  236. ──────────────────────────────────────────────────────────────────────────
  237. Step 5.  Cut the below ansi and save as GFILES\DMENU.ANS 
  238. ──────────────────────────────────────────────────────────────────────────
  239.  
  240. ╒═════════════════════════════════════════════════════════════════════════════╕
  241. │ Account Editor -    User:C
  242. ╞══╤════════════════════════════════╤═════════════════════════════════════════╡
  243. 1.│ Screen Sizes   -CA Change Color SetupC
  244. ╞══╪════════════════════════════════╪═════════════════════════════════════════╡
  245. 2.│ Graphix Mode   -CB Configure Message ScannerC
  246. ╞══╪════════════════════════════════╪═════════════════════════════════════════╡
  247. 3.│ Pause Prompts  -CC Change PasswordC
  248. ╞══╪════════════════════════════════╪═════════════════════════════════════════╡
  249. 4.│ SysOp Reg #    -CD Update Macros <CNTRL- A,D,F>C
  250. ╞══╪════════════════════════════════╪═════════════════════════════════════════╡
  251. 5.│ Optional Lines -C│C│
  252. ╞══╪════════════════════════════════╪═════════════════════════════════════════╡
  253. 6.│ Extended Color -C│C│
  254. ╞══╧════════════════════════════════╧═════════════════════════════════════════╡
  255. 7.│ Msg Editor   :C
  256. ╞══╪══════════════════════════════════════════════════════════════════════════╡
  257. 8.│ Mailbox Stats:C
  258. ╞══╪══════════════════════════════════════════════════════════════════════════╡
  259. 9.│ User Note    :C
  260. ╘══╧══════════════════════════════════════════════════════════════════════════╛D
  261. ──────────────────────────────────────────────────────────────────────────
  262. Stop Cutting Here!!!!!!!!   Now go save what you've just cut to the gfiles
  263. ──────────────────────────────────────────────────────────────────────────
  264.  
  265.  
  266.         Thank you for trying DEVL001.MOD
  267.  
  268. Disclaimer.  This mod works as smooth as a baby's bottom on my board.
  269.